<!doctype html>
<html>

<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
  <link rel="stylesheet" href="../../static/BOSGeo/BOSGeo.css" />
  <title>添加自定义影像图</title>
  <style>
    html {
      font-size: 12px;
    }

    html,
    body,
    #mapContainer {
      height: 100%;
      width: 100%;
      padding: 0;
      margin: 0;
    }
  </style>
</head>

<body>
  <div id="mapContainer"></div>
  <script src="../../static/BOSGeo/BOSGeo.js"></script>
  <script>
    var map = new BOSGeo.Map('mapContainer', {
    mapType: BOSGeo.TDT_IMAGERY
    });
    map.imageryLayers.remove(map.imageryLayers.get(0)); // 删除影像图
    map.addImageryProvider({
        // 'http://172.17.30.9:8090/geoserver/gwc/rest/wmts/conswaste:shenzhen_image/{style}/{TileMatrixSet}/{TileMatrixSet}:{TileMatrix}/{TileRow}/{TileCol}?format=image/png',
        url: 'http://geopre.szsti.org:8091/geoserver/gwc/service/wmts?',
        layer: 'slope:shenzhen_img',
        style: 'raster',
        format: 'image/png',
        tileMatrixSetID: 'EPSG:4326', // 900913
        tileMatrixLabels: [
            'EPSG:4326:0',
            'EPSG:4326:1',
            'EPSG:4326:2',
            'EPSG:4326:3',
            'EPSG:4326:4',
            'EPSG:4326:5',
            'EPSG:4326:6',
            'EPSG:4326:7',
            'EPSG:4326:8',
            'EPSG:4326:9',
            'EPSG:4326:10',
            'EPSG:4326:11',
            'EPSG:4326:12',
            'EPSG:4326:13',
            'EPSG:4326:14',
            'EPSG:4326:15',
            'EPSG:4326:16',
            'EPSG:4326:17',
            'EPSG:4326:18',
            'EPSG:4326:19',
            'EPSG:4326:20',
            'EPSG:4326:21'

        ],
        tilingScheme: new BOSGeo.GeographicTilingScheme()
    });
    map.flyTo(114.042, 22.516, 5000, 0.6)
  </script>
</body>

</html>
